#ifndef ABSTRACTFILELOADER_H
#define ABSTRACTFILELOADER_H

#include <QObject>

class FileSection : public QObject
{
    Q_OBJECT
public:
    FileSection();
    virtual QString getSectionName() = 0;
    virtual char *getHandle() = 0;
    virtual uint getSize() = 0;


private:

};

class AbstractFileLoader : public QObject
{
    Q_OBJECT
public:
    AbstractFileLoader();
    virtual ~AbstractFileLoader() {}
public:
    static AbstractFileLoader *getLoader();
    virtual bool load(QString fileName) = 0;
    virtual char *getHandle() = 0;
    virtual uint getSize() = 0;
    virtual FileSection *getSection(QString sectionName) = 0;
    virtual QList<FileSection*> getSections() = 0;
signals:
    void sectionsRead(QList<FileSection*> sections);
    void textSectionRead(uchar *textBuffer, uint size);
    void fileLoaded(AbstractFileLoader *file);
};

#endif // ABSTRACTFILELOADER_H
